﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/Default.Master" CodeBehind="Register.aspx.vb" Inherits="GuildCMS.Account.Register" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../CSS/Account/Register.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>
    
    <!-- jQuery validate JavaScript. -->
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#form1").validate();
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <%-- Panel displaying the registration form to the visitor. --%>
    <asp:Panel ID="panForm" runat="server">
    
        <!-- Collect required visitor data in order to start the registration process. -->
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblLogin" runat="server" AssociatedControlID="txtLogin" Text="Login:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtLogin" runat="server" MaxLength="25" CssClass="required" MinLength="3"></asp:TextBox>     
                <asp:CustomValidator ID="valLogin" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtLogin"
                    ErrorMessage="There was an error processing this field."
                    OnServerValidate="valLogin_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblPassword1" runat="server" AssociatedControlID="txtPassword1" Text="Password:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtPassword1" TextMode="Password" runat="server" MaxLength="32" CssClass="required"></asp:TextBox>
                <asp:CustomValidator ID="valPassword1" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtPassword1"
                    ErrorMessage="There was an error processing this field."
                    OnServerValidate="valPassword1_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblPassword2" runat="server" AssociatedControlID="txtPassword2" Text="Password:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtPassword2" TextMode="Password" runat="server" MaxLength="32" CssClass="required"></asp:TextBox>
                <asp:CustomValidator ID="valPassword2" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtPassword2"
                    ErrorMessage="There was an error processing this field."
                    OnServerValidate="valPassword2_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblEmail1" runat="server" AssociatedControlID="txtEmail1" Text="Email:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtEmail1" runat="server" MaxLength="100" CssClass="required email"></asp:TextBox>
                <asp:CustomValidator ID="valEmail1" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtEmail1"
                    ErrorMessage="There was an error processing this field."
                    OnServerValidate="valEmail1_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblEmail2" runat="server" AssociatedControlID="txtEmail2" Text="Email:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtEmail2" runat="server" MaxLength="100" CssClass="required email"></asp:TextBox>
                <asp:CustomValidator ID="valEmail2" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtEmail2"
                    ErrorMessage="There was an error processing this field."
                    OnServerValidate="valEmail2_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        
        <!-- Display a CAPTCHA image. -->
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblCaptcha" runat="server" Text="Captcha:"></asp:Label></div>
            <div class="formitemelement">
                <recaptcha:RecaptchaControl
                    PublicKey="6Ld7igoAAAAAAGXUkAkm4bFHin-3WeqGEo_fEcp0"
                    PrivateKey="6Ld7igoAAAAAAPWu1S8ieCPpAsv1inlOcpquYdwA"
                    ID="reCaptcha" runat="server" />
            </div>
        </div>
        
        <!-- Form submit button. -->
        <div class="formitemholder">
            <div class="formitemlabel"></div>
            <div class="formitemelement"><asp:Button ID="btnRegister" runat="server" Text="Register" CausesValidation="true" /></div>
        </div>
    </asp:Panel>
    
    <%-- Panel displayed to the visitor once the form has been submitted successfully. --%>
    <asp:Panel ID="panInstructions" Visible="false" runat="server">
        An email has been sent containing an activation link.
    </asp:Panel>
    
</asp:Content>
